package com.omnisyr.textrebuilder.util;

import java.io.File;
import java.util.Scanner;

import com.omnisyr.textrebuilder.common.Color;
import com.omnisyr.textrebuilder.util.structure.SimpleArrayList;

public class IOUtils {

	@Sorted
	public static SimpleArrayList<Color> readBlackList() {

		SimpleArrayList<Color> blackList = new SimpleArrayList<Color>();

		try {

			Scanner scanner = new Scanner(new File("assets/blackList.txt"));

			while (scanner.hasNext()) {

				blackList.add(Color.ofString(scanner.nextLine()));

			}

			scanner.close();
			blackList.sort(Color.hashComparator);

		} catch (Exception e) {

		}

		return blackList;

	}

}
